home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Table / Sources / Proxy.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  3.9 KB  |  133 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Proxy.h
  4. //    Release Version:    $ ODF 3 $ 
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PROXY_H
  11. #define PROXY_H
  12.  
  13. #ifndef PART_H
  14. #include "Part.h"
  15. #endif
  16.  
  17. #ifndef CELL_H
  18. #include "Cell.h"
  19. #endif
  20.  
  21. // ----- ODF Includes -----
  22.  
  23. #ifndef FWPROXY_H
  24. #include "FWProxy.h"
  25. #endif
  26.  
  27. // ----- Foundation Layer -----
  28.  
  29. #ifndef FWRUNTYP_H
  30. #include "FWRunTyp.h"
  31. #endif
  32.  
  33. #ifndef FWTCOLL_H
  34. #include "FWTColl.h"
  35. #endif
  36.  
  37. //========================================================================================
  38. //    Forward declarations
  39. //========================================================================================
  40.  
  41. class CTablePart;
  42. class CTablePartContent;
  43.  
  44. //========================================================================================
  45. //    class CTableProxy
  46. //========================================================================================
  47.  
  48. class CTableProxy : public FW_MProxy, public FW_MRefCount
  49. {
  50. public:
  51.  
  52. //----------------------------------------------------------------------------------------
  53. //    Initialization/Destruction
  54. //
  55.   public:
  56.     CTableProxy(Environment* ev, CTablePart* tablePart, CTablePartContent* content);
  57.   private:
  58.     virtual ~ CTableProxy();
  59.  
  60. //----------------------------------------------------------------------------------------
  61. //    Inherited API
  62. //
  63.     virtual void         UsedShapeChanged(Environment *ev,
  64.                                       FW_CEmbeddingFrame* embeddingFrame,
  65.                                       ODFrame* odEmbeddedFrame);
  66.  
  67.     virtual ODShape*     FrameShapeRequested(Environment* ev, 
  68.                                     FW_CEmbeddingFrame* embeddingFrame, 
  69.                                     ODFrame* odEmbeddedFrame, 
  70.                                     ODShape* askedFrameShape);
  71.  
  72.     virtual short        CreateFacets(Environment* ev,
  73.                                     FW_CEmbeddingFrame* embeddingFrame,
  74.                                     ODFacet* embeddingFacet,
  75.                                     ODFrame* embeddedFrame,
  76.                                     ODShape* proposedClipShape);
  77.                                     
  78. //----------------------------------------------------------------------------------------
  79. //    New API
  80. //
  81.   public:
  82.     void                MoveEmbeddedFrames(Environment* ev, const CCell& destCell);
  83.     ODShape*            AcquireHiliteShape(Environment* ev, const CCell& cell, FW_CEmbeddingFrame* frame);
  84.  
  85.     // ----- Getters/Setters -----
  86.     const CCell&         GetCell() const;
  87.     void                SetCell(const CCell& cell);    
  88.     
  89.     ODUpdateID            GetLinkSpecID()    
  90.                                 { return fLinkSpecID; }
  91.     void                SetLinkSpecID(ODUpdateID id)
  92.                                 { fLinkSpecID = id; }
  93.  
  94. //----------------------------------------------------------------------------------------
  95. //    Data Members
  96. //
  97.   private:
  98.     CTablePart*            fTablePart;
  99.     CTablePartContent*    fTableContent;
  100.     CCell                fCell;
  101.     ODUpdateID            fLinkSpecID;        // id of link spec written to clipboard
  102. };
  103.  
  104. //========================================================================================
  105. //    CTableProxy Inlines
  106. //========================================================================================
  107.  
  108. //----------------------------------------------------------------------------------------
  109. //    CTableProxy::GetCell
  110. //----------------------------------------------------------------------------------------
  111. inline const CCell& CTableProxy::GetCell() const
  112. {
  113.     return fCell;
  114. }
  115.  
  116. //----------------------------------------------------------------------------------------
  117. //    CTableProxy::SetCell
  118. //----------------------------------------------------------------------------------------
  119. inline void CTableProxy::SetCell(const CCell& cell)
  120. {
  121.     fCell = cell;
  122. }
  123.  
  124. //========================================================================================
  125. // TypeDefs
  126. //========================================================================================
  127.  
  128. typedef FW_TRefCountedCollection<CTableProxy> CTableProxyCollection;
  129. typedef FW_TRefCountedCollectionIterator<CTableProxy> CTableProxyCollectionIterator;
  130.  
  131.  
  132. #endif
  133.